package com.litong.litongjiaoyu.entity;


import java.util.Arrays;

public class SysCampus {

  private long id;
  private String name;
  private String address;
  private double longitude;
  private double latitude;
  private String img;
  private String phone1;
  private String phone2;
  public String[] imgList;


  public long getId() {
    return id;
  }

  public void setId(long id) {
    this.id = id;
  }


  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }


  public String getAddress() {
    return address;
  }

  public void setAddress(String address) {
    this.address = address;
  }


  public double getLongitude() {
    return longitude;
  }

  public void setLongitude(double longitude) {
    this.longitude = longitude;
  }


  public double getLatitude() {
    return latitude;
  }

  public void setLatitude(double latitude) {
    this.latitude = latitude;
  }


  public String getImg() {
    return img;
  }

  public void setImg(String img) {
    this.img = img;
  }


  public String getPhone1() {
    return phone1;
  }

  public void setPhone1(String phone1) {
    this.phone1 = phone1;
  }


  public String getPhone2() {
    return phone2;
  }

  public void setPhone2(String phone2) {
    this.phone2 = phone2;
  }

  public String[] getImgList() {
    return imgList;
  }

  public void setImgList(String[] imgList) {
    this.imgList = imgList;
  }

  @Override
  public String toString() {
    return "SysCampus{" +
            "id=" + id +
            ", name='" + name + '\'' +
            ", address='" + address + '\'' +
            ", longitude=" + longitude +
            ", latitude=" + latitude +
            ", img='" + img + '\'' +
            ", phone1='" + phone1 + '\'' +
            ", phone2='" + phone2 + '\'' +
            '}';
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (!(o instanceof SysCampus)) return false;

    SysCampus sysCampus = (SysCampus) o;

    if (getId() != sysCampus.getId()) return false;
    if (Double.compare(sysCampus.getLongitude(), getLongitude()) != 0) return false;
    if (Double.compare(sysCampus.getLatitude(), getLatitude()) != 0) return false;
    if (getName() != null ? !getName().equals(sysCampus.getName()) : sysCampus.getName() != null) return false;
    if (getAddress() != null ? !getAddress().equals(sysCampus.getAddress()) : sysCampus.getAddress() != null)
      return false;
    if (getImg() != null ? !getImg().equals(sysCampus.getImg()) : sysCampus.getImg() != null) return false;
    if (getPhone1() != null ? !getPhone1().equals(sysCampus.getPhone1()) : sysCampus.getPhone1() != null) return false;
    if (getPhone2() != null ? !getPhone2().equals(sysCampus.getPhone2()) : sysCampus.getPhone2() != null) return false;
    // Probably incorrect - comparing Object[] arrays with Arrays.equals
    return Arrays.equals(getImgList(), sysCampus.getImgList());
  }
}
